package cate.common.table.pvp.guildwar.row;


import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("据点配置")
public class GuildWarPtRow extends ERow {

    @NoteField("公会等级")
    public int guildLevel;

    @NoteField("位置编号")
    public int ptId;

    @NoteField("机器人实例")
    public String dynCfg;

    @NoteField("简单难度功勋")
    public long d1Point;

    @NoteField("普通难度功勋")
    public long d2Point;

    @NoteField("困难难度功勋")
    public long d3Point;

    @NoteField("挑战失败功勋")
    public long failPoint;

    @NoteField("挑战成功奖励")
    public String winRwdStr;

    @NoteField("挑战失败奖励")
    public String loseRwdStr;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID", 0);
        this.guildLevel = xrw.getInteger("公会等级",0);
        this.ptId = xrw.getInteger("位置编号",0);
        this.dynCfg = xrw.getString("机器人实例");
        this.d1Point = xrw.getLong("简单难度功勋",0L);
        this.d2Point = xrw.getLong("普通难度功勋",0L);
        this.d3Point = xrw.getLong("困难难度功勋",0L);
        this.failPoint = xrw.getLong("挑战失败功勋",0L);
        this.winRwdStr = xrw.getString("挑战成功奖励");
        this.loseRwdStr = xrw.getString("挑战失败奖励");
    }


    public long getPoint(int difficulty){
        switch (difficulty){
            case 1:return d1Point;
            case 2:return d2Point;
            case 3:return d3Point;
            default:return 0L;
        }
    }



}
